package com.ruoyi.quartz.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.ruoyi.quartz.domain.DataSource;
import com.ruoyi.quartz.domain.JobInfoConfig;
import com.ruoyi.quartz.domain.JobLogDTO;

/**
 * Created by acer on 2019/2/23.
 */
@Mapper
public interface JobInfoConfigMapper {
	String getCronTime(Map<String,String> params);

	void updateJobConfigById(Map<String, Object> updateMap);

	String checkInstanceConfig(Map<String, String> paramMap);

	List<JobInfoConfig> getJobConfig(Map<String, String> paramMap);

	Long insertJobLog(JobLogDTO logDTO);

	Long lockJobConfig(String jobName);

	void updateJobLogByIdlogDTO(JobLogDTO logDTO);

	int updateJobRunningStatus(Map<String, String> paramMap);
	
	Boolean judgePreviousJobStatus(String jobName);

	Long getJobLimitOne(Map<String, Object> updateMap);
	
    /**
     * @Description: 查询task任务参数
     * @Param: [id] 任务id
     * @return: com.alibaba.fastjson.JSONObject
     * @Author: weiqiang
     * @Date: 2019/5/30
     */
    String selectTaskParams(@Param("id") Long id);
    /**
     * 
    * @Title: updateParam
    * @Description: 更新参数
    * @param param    参数
    * @return void    返回类型
     */
    void updateParam(Map<String,Object> param);
    /**
     * @return List<DataSource>
     * 
     * @Title: selectTaskDataSource
     * @Description: 查询系统数据源
     * @param     参数
     * @return void    返回类型
     */
	List<DataSource> selectTaskDataSource();

	List<JobInfoConfig> selectJobList(JobInfoConfig job);
}
